<%@page contentType="text/html" pageEncoding="UTF-8"%>
 <%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>  
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>  
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <script type="text/javascript">
            var open_cur = 0;
            if (typeof jQuery == 'undefined') {
                window.location.href="accessdenied.jsp";
            } else {
            }
            $j = jQuery.noConflict();
            $j(document).ready(function(){
                $j('input#leavedate1').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
               validateform("cus-input-form");
              
            });
        </script>
        <style type="text/css">
            #ui-datepicker-div
            {
                z-index: 9999999;
            }

        </style>
    </head>
    <f:view>
        <a4j:form id="cus-input-form">
            <body style=" float:left; width:auto; height:auto; margin:0px;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <div class="popup" style="height:540px; width:380px">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="#{locale.update_customer}"/></div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content">
                            <div class="form_item_content" style="display: block;">

                                <div class="fields_input">
                                    <label><h:outputText value="#{locale.title}"/></label>
                                    <h:selectOneMenu value="#{CustomerBean.nv108}">  
                                        <f:selectItems value="#{CustomerBean.selectItems}" />  
                                    </h:selectOneMenu>

                                </div>
                                <div class="fields_input">
                                    <label><h:outputText value="#{locale.fname}"/>*:</label>&nbsp;
                                    <h:inputText value="#{CustomerBean.nv102}" id="firstname" styleClass="required ">                                      
                                    </h:inputText>

                                </div>
                                <div class="fields_input">
                                    <label><h:outputText value="#{locale.lname}"/>*:</label>&nbsp;                                     
                                    <h:inputText value="#{CustomerBean.nv103}" id="lastname" lang="firstname" styleClass="required"></h:inputText>
                                </div>
                                <div class="fields_input">
                                    <label> <h:outputText value="#{locale.sex}"/>*:</label>
                                    <h:selectOneRadio value="#{CustomerBean.nv107}" styleClass="feild_sex"    >
                                        <f:selectItem itemValue="M" itemLabel="#{locale.employeeSexMale}" />
                                        <f:selectItem itemValue="F" itemLabel="#{locale.employeeSexFmale}"/>                                                     
                                    </h:selectOneRadio>
                                </div>
                                <div class="fields_input">
                                    <label> <h:outputText value="#{locale.customertype}"/>:</label>
                                    <h:selectOneRadio value="#{CustomerBean.ni104}" styleClass="select_cus" id="select_cus_ck"  >
                                        <f:selectItem  itemValue="1" itemLabel="#{locale.normalcustomer}"/> 
                                        <f:selectItem id="tn" itemValue="0" itemLabel="#{locale.hiddencustomer}"  />
                                    </h:selectOneRadio>
                                </div>
                                <div class="fields_input">                                       
                                    <label><h:outputText value="#{locale.dateBorn}"/>*:</label>&nbsp;
                                    <input type="text" id="leavedate1" name="leavedate1" id="date" name="date" class="input_fields required date"  
                                    value="<h:outputText value="#{CustomerBean.nd118}"> <f:convertDateTime pattern="dd.MM.yyyy"/></h:outputText>"/>

                                </div>

                                <div class="fields_input">
                                    <label><h:outputText value="#{locale.status_marries}"/>:</label>
                                    <h:selectOneMenu value="#{CustomerBean.nv109}"  >                                           
                                        <f:selectItem itemLabel="#{locale.status_family_true}" itemValue="1" />
                                        <f:selectItem itemLabel="#{locale.status_family_false}" itemValue="2" />
                                        <f:selectItem itemLabel="#{locale.status_family_orther}" itemValue="3" />
                                    </h:selectOneMenu>
                                </div>
                                <div class="fields_input">
                                    <label><h:outputText value="#{locale.career}"/>:</label>
                                    <h:selectOneMenu  value="#{CustomerBean.fn550}" >  
                                        <f:selectItems value="#{CustomerBean.listSelectItems}" />                                            
                                    </h:selectOneMenu>
                                </div> 
                                <div class="fields_input">
                                    <label><h:outputText value="#{locale.department}"/>:</label>&nbsp;
                                    <h:inputText value="#{CustomerBean.nv110}" />    
                                </div> 
                                <div class="fields_input">
                                    <label><h:outputText value="#{locale.position}"/>:</label>&nbsp;
                                    <h:inputText value="#{CustomerBean.nv111}" />    
                                </div> 
                                <div class="bg_department">
                                    <div class="fields_input  <h:outputText value='#{CustomerBean.fn850gt}'/>">
                                        <label><h:outputText value="#{locale.department}"/>:</label>
                                        <h:selectOneMenu   id="cmbNv113" value="#{CustomerBean.fn850gt}"  valueChangeListener="#{CustomerBean.changeCombN850forN900}">
                                            <f:selectItems value="#{CustomerBean.selectCombN850}" />
                                            <a4j:support event="onchange" reRender="nv112" />
                                        </h:selectOneMenu>
                                    </div>

                                    <div class="fields_input <h:outputText value='#{CustomerBean.nv112}'/>">
                                        <label><h:outputText value="#{locale.emp_intro}"/>:</label>&nbsp;
                                        <h:selectOneMenu id="nv112" value="#{CustomerBean.nv112}">
                                            <f:selectItems value="#{CustomerBean.selectItemN900}"></f:selectItems>
                                        </h:selectOneMenu>
                                    </div>
                                         <div class="alert"></div>
                                </div>
                               
                            </div>
                        </div>
                    </div>
                    <div class="popup-footer">
                        <h:inputHidden id="FFN600" value="#{CustomerBean.FN600}" />
                        <h:inputHidden id="FK100" value="#{CustomerBean.fk100}" />
                        <div class="buttonsave" onclick="parent.jQuery.fancybox.close(); "  ><span><h:outputText value="#{locale.close}"/></span></div>
                        <h:commandButton  onclick="return validatecheck('cus-input-form');" action="#{CustomerBean.saveCustomer}" styleClass="buttonsave" value="#{locale.save}">
                        </h:commandButton>
                        <h:inputHidden value="#{CustomerBean.flag}" id="flag" />
                        <h:inputHidden value="#{CustomerBean.pn100}" id="pn100" />
                        <h:inputHidden value="#{CustomerBean.sendPage}" id="sendPage" />
                        <h:inputHidden value="#{CustomerBean.fn850}" id="fn850" />
                        <h:inputHidden value="#{CustomerBean.nv113}" id="nv113" />
                        <h:inputHidden value="#{CustomerBean.pagereload}" id="pagereload" />
                        <h:inputHidden value="#{CustomerBean.ni105}" id="ni105" />
                       
                        <h:inputHidden value="#{CustomerBean.nn117}" id="nn117" />


                    </div>
                </div>


            </body>
        </a4j:form>
    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>
